package com.hefei.hight.reflection;

/**
 * @author caizhengjun
 * @date 2020/9/5 11:03 上午
 */
public class Test03 {
    public static void main(String[] args) throws Exception {
        //1获取系统类加载器
        ClassLoader classLoader = ClassLoader.getSystemClassLoader();
        System.out.println(classLoader);

        //2获取系统类加载器的父类加载器
        ClassLoader classLoaderParent = classLoader.getParent();
        System.out.println(classLoaderParent);

        ClassLoader classLoaderParentParent = classLoaderParent.getParent();
        System.out.println(classLoaderParentParent);

        ClassLoader loader = Class.forName("com.hefei.hight.reflection.Person").getClassLoader();
        System.out.println(loader);
    }
}
